import 'package:flutter/material.dart';
import 'package:get/get.dart';

class FlowCenterController extends GetxController with SingleGetTickerProviderMixin {
  final List<String> myTabs = <String>["流程申请", "流程待办", "流程查看"];
  late TabController tabController;
  var currentTabIndex = 0.obs;

  @override
  void onInit() {
    super.onInit();
    tabController = TabController(vsync: this, length: myTabs.length);
    tabController.addListener(() {
      if (tabController.indexIsChanging) {
      } else {
        currentTabIndex.value = tabController.index;
      }
    });
  }

  @override
  void onClose() {
    tabController.dispose();
    super.onClose();
  }
}
